/*
 *  LOAD MORE BUTTON
 *  On the main blog page, button to fetch more posts
 *
 */

.load-more-button {
  display: block;
  padding: 40px 0 60px;
  text-align: center;
  margin: 0 auto;

  &.hidden {
    display: none;
  }
}

.load-more-button-wrapper{
  display: flex;
  align-items: center;
  justify-content: center;
}

.load-more-button {
  button {
    @include buttonStyle();
    @include buttonColor();
    display: inline-block;
    width: 100%;

    .loader {
      position: relative;
      display: inline-block;
      width: 15px;
      height: 15px;
      margin-top: -2px;
      margin-left: 15px;
      transform-origin: 50% 50%;

      &:before,
      &:after {
        content: "";
        position: absolute;
        background: $nonBlack;
      }
      &:before {
        top: 6px;
        left: 0;
        height: 2px;
        width: 14px;
      }
      &:after {
        top: 0;
        left: 6px;
        width: 2px;
        height: 14px;
      }
    }

    &.loading {
      .loader {
        animation: spin 1s infinite linear;
      }
    }
  }

  @media screen and (min-width: $bp-medium) {
    margin: 0 auto;

    button {
      width: auto;
      min-width: 160px;
    }
  }
}
